<!DOCTYPE html>
<html>
<head lang="en">
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=1000,user-scalable=no" >
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="format-detection" content="telephone=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp"/>
  <title></title>
	<script type="text/javascript" src="../lib/js/vue.js" ></script>
  <link rel="stylesheet" href="../lib/css/common.css"/>
	<link rel="stylesheet" href="../lib/css/swiper.min.css"/>
  <link rel="stylesheet" href="../lib/css/css.css"/>
</head>
<body>
<div id="mainBody" class="main_body" v-cloak>
	
</div>

<script type="text/javascript" src="../lib/js/jquery.min.js"></script>
<script type="text/javascript" src="../lib/js/swiper.min.js"></script>
<script type="text/javascript" src="../lib/layer/layer.js"></script>
<script type="text/javascript" src="../lib/js/js.js" ></script>
<script type="text/javascript" >

var vm = new Vue({
	el: '#mainBody',
	data(){
		return{
			userInfo:null,
		}
	},
	created() {
		sessionStorage.clear();
		let token = getQueryString('token');
		let is_activation = getQueryString('is_activation');
        let is_endtime = getQueryString('is_endtime');
		if(!token || token == ''){
			window.location.href = "http://admin.youhulexue.com/index.php?s=/api/user/getqr/wxapp_id/10002"
		}else{
			$request({
				url:'/index.php?s=/api/user/detail/wxapp_id/10002',
				method:'post',
				data:{
					token:token
				},
				success:(res)=>{
					this.userInfo = {
						token:token,
						is_activation:is_activation,
						data:res.data.userInfo,
						logoInfo:res.data.store,
					};
					sessionStorage.setItem('userInfo',JSON.stringify(this.userInfo))
                  if(is_activation == 0){
                    window.location.href = "./activate.html"
                  }else{
                    if (is_endtime == 1){
                      layer.open({
                        title: '到期提醒'
                        ,content: '您所使用的机构账号已到期请联系客服进行核验再次开通'
                        ,btn: ['确定']
                        ,closeBtn: 0
                        ,btn1: function(index, layero){
                          window.location.href = "./activate.html"
                        }
                      });
                    }else{
                      window.location.href = "./index.html"
                    }

                  }
				}
			})
			
		}
	},
	mounted(){
		
	},
	methods: {
		
	},
});
  
</script>
</body>
</html>